<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ArrayDataProvider */

$this->title = '权限';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <p>
        <?= Html::a('创建权限', ['create'], ['class' => 'btn btn-success']) ?>
    </p>
    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],
            [
                'attribute' => 'name',
                'label'=>'描述',
            ],
            [
                'attribute' => 'description',
                'label'=>'描述',
            ],
            [
                'attribute' => 'createdAt',
                'label'=>'创建时间',
                'format' => ['date', 'php:Y-m-d G:i:s']
            ],
            [
                'attribute' => 'updatedAt',
                'label'=>'修改时间',
                'format' => ['date', 'php:Y-m-d G:i:s']
            ],
            [
                    'class' => 'yii\grid\ActionColumn',
                    'template'=>'{update} {delete}'
            ],
        ],
    ]); ?>
</div>